package com.ptu.spzx.domain.Exam;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author YT
 * @since 2024-01-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class Exam implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 考试编号
     */
    @TableId(value = "exam_id", type = IdType.AUTO)
    private Long examId;

    /**
     * 所属课程
     */
    private Integer courseId;

    /**
     * 学期
     */
    private String semester;

    /**
     * 考试名
     */
    private String examName;

    /**
     * 考试发布时间
     */
    private String examPublishTime;

    /**
     * 考试开始时间
     */
    private String examBeginTime;

    /**
     * 考试结束时间
     */
    private String examEndTime;

    /**
     * 考试备注
     */
    private String examDescription;

    /**
     * 创建者
     */
    @TableField(fill = FieldFill.INSERT)
    private String creator;

    /**
     * 更新者
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String updater;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updateTime;

    /**
     * 是否删除
     */
    @JsonIgnore
    @TableLogic
    private Boolean isDelete;
}
